|
macro msb_dw x { dw ((x and 0FF00h) shr 8) or ((x and 0FFh) shl 8) }
macro lb_dw x {
dw x
msb_dw x }
macro msb_dd x {
dd ((x and 0FF000000h) shr 24) or ((x and 0FF0000h) shr 8) or \
((x and 0FF00h) shl 8) or ((x and 0FFh) shl 24) }
macro lb_dd x {
dd x
msb_dd x }
macro binary_date year, month, day, hour, minute, second, offset {
db year-1900, month, day, hour, minute, second, offset }
macro text_date year, month, day, hour, minute, second, hundredth, offset {
db year, month, day, hour, minute, second, hundredth, offset }
Bootable_CD:
Read_Me:
db "This is an ISO9660/Joliet bootable cdrom image.",0Dh,0Ah
db "Copyright 2005 MikeGonta.com",0Dh,0Ah
db "May be freely used and distributed for personal use.",0Dh,0Ah
.Read_Me:
times 2048*9-($-Read_Me) db 0
BootCat.Bin:
.Validation_Entry:
.Header_ID: db 1
.Platform_ID: db 0
dw 0
.ID_String: db ""
times 24 db 0
.Checksum_Word: db 0AAh, 55h
.Signature db 55h, 0AAh
.Default_Entry:
.Boot_Indicator: db 88h
.Boot_Media_Type: db 0 ; no emulation
.Load_Segment: dw 0 ; the bios will load at 7C0:0 or 0:7c00
.System_Type: db 0
db 0
.Virtual_Sector_Count: dw 4 ; one CD sector
.Load_RBA: dd (Boot_Sector-Bootable_CD)/2048
times 2048-($-BootCat.Bin) db 0
Primary_Directory_Records:
Primary_1:
.size: db 34
.extended_attribute: db 0
.location: lb_dd ((Primary_Directory_Records-Bootable_CD)/2048)
.data_length: lb_dd 2048
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 2
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db 1
.file_identifier: db 0
Primary_2:
.size: db 34
.extended_attribute: db 0
.location: lb_dd ((Primary_Directory_Records-Bootable_CD)/2048)
.data_length: lb_dd 2048
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 2
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db 1
.file_identifier: db 1
Primary_Readme:
.size: db .Primary_Readme-Primary_Readme
.extended_attribute: db 0
.location: lb_dd ((Read_Me-Bootable_CD)/2048)
.data_length: lb_dd (Read_Me.Read_Me-Read_Me)
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 0
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db .Primary_Readme-.file_identifier
.file_identifier: db "README.TXT",59,49
.Primary_Readme:
times 2048-($-Primary_Directory_Records) db 0
Primary_Type_L_Path_Table:
.size: db 1
.extended_attribute: db 0
.extent_location: dd ((Primary_Directory_Records-Bootable_CD)/2048)
.parent_directory: dw 1
.directory_identifier: dw 0
times 2048-($-Primary_Type_L_Path_Table) db 0
Primary_Type_M_Path_Table:
.size: db 1
.extended_attribute: db 0
.extent_location: msb_dd ((Primary_Directory_Records-Bootable_CD)/2048)
.parent_directory: msb_dw 1
.directory_identifier: msb_dw 0
times 2048-($-Primary_Type_M_Path_Table) db 0
Supplementary_Directory_Records:
Supplementary_1:
.size: db 34
.extended_attribute: db 0
.location: lb_dd ((Supplementary_Directory_Records-Bootable_CD)/2048)
.data_length: lb_dd 2048
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 2
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db 1
.file_identifier: db 0
Supplementary_2:
.size: db 34
.extended_attribute: db 0
.location: lb_dd ((Supplementary_Directory_Records-Bootable_CD)/2048)
.data_length: lb_dd 2048
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 2
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db 1
.file_identifier: db 1
Supplementary_Readme:
.size: db .Supplementary_Readme-Supplementary_Readme
.extended_attribute: db 0
.location: lb_dd ((Read_Me-Bootable_CD)/2048)
.data_length: lb_dd (Read_Me.Read_Me-Read_Me)
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 0
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db .Supplementary_Readme-.file_identifier
.file_identifier:
db 0,"R",0,"e",0,"a",0,"d",0," ",0,"m",0,"e",0,".",0,"t",0,"x",0,"t"
db 0,59,0,49
.Supplementary_Readme:
times 2048-($-Supplementary_Directory_Records) db 0
Supplementary_Type_L_Path_Table:
.size: db 1
.extended_attribute: db 0
.extent_location: dd ((Supplementary_Directory_Records-Bootable_CD)/2048)
.parent_directory: dw 1
.directory_identifier: dw 0
times 2048-($-Supplementary_Type_L_Path_Table) db 0
Supplementary_Type_M_Path_Table:
.size: db 1
.extended_attribute: db 0
.extent_location: msb_dd ((Supplementary_Directory_Records-Bootable_CD)/2048)
.parent_directory: msb_dw 1
.directory_identifier: msb_dw 0
times 2048-($-Supplementary_Type_M_Path_Table) db 0
Primary_Volume_Descriptor:
.Volume_Descriptor_Type: db 1
.Standard_Identifier: db "CD001"
.Volume_Descriptor_Version: db 1
.Volume_Flags db 0
.System_Identifier:
times 32-($-.System_Identifier) db " "
.Volume_Identifier: db "BOOTABLE_CD"
times 32-($-.Volume_Identifier) db " "
times 8 db 0
.Volume_Space_Size: lb_dd ((Boot_Sector-Bootable_CD)/2048)
times 32 db 0
.Volume_Set_Size: lb_dw 1
.Volume_Sequence_Number: lb_dw 1
.Logical_Block_Size: lb_dw 2048
.Path_Table_Size: lb_dd 10
.Type_L_Path_Table: dd ((Primary_Type_L_Path_Table-Bootable_CD)/2048)
.Optional_Type_L_Path_Table: dd 0
.Type_M_Path_Table: msb_dd ((Primary_Type_M_Path_Table-Bootable_CD)/2048)
.Optional_Type_M_Path_Table: msb_dd 0
.Root_Directory_Record:
.size: db 34
.extended_attribute: db 0
.location: lb_dd ((Primary_Directory_Records-Bootable_CD)/2048)
.data_length: lb_dd 2048
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 2
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db 1
.file_identifier: db 0
.Volume_Set_Identifier:
times 128-($-.Volume_Set_Identifier) db " "
.Publisher_Identifier:
times 128-($-.Publisher_Identifier) db " "
.Data_Preparer_Identifier:
times 128-($-.Data_Preparer_Identifier) db " "
.Application_Identifier:
times 128-($-.Application_Identifier) db " "
.Copyright_File_Identifier:
times 37-($-.Copyright_File_Identifier) db " "
.Abstract_File_Identifier:
times 37-($-.Abstract_File_Identifier) db " "
.Bibliographic_File_Identifier:
times 37-($-.Bibliographic_File_Identifier) db " "
Primary_Volume_Creation_Date_and_Time:
text_date "2005", "01", "01", "00", "00", "00", "00", 0
Primary_Volume_Modification_Date_and_Time:
text_date "2005", "01", "01", "00", "00", "00", "00", 0
.Volume_Expiration_Date_and_Time:
times 17 db 0
.Volume_Effective_Date_and_Time:
times 17 db 0
.File_Structure_Version: db 1
times 2048-($-Primary_Volume_Descriptor) db 0
Boot_Record_Descriptor:
.Volume_Descriptor_Type: db 0
.Standard_Identifier: db "CD001"
.Volume_Descriptor_Version: db 1
.Boot_System_Identifier: db "EL TORITO SPECIFICATION"
times 64-($-.Boot_System_Identifier) db 0
.Boot_Catalog_Sector: dd (BootCat.Bin-Bootable_CD)/2048
times 2048-($-Boot_Record_Descriptor) db 0
Supplementary_Volume_Descriptor:
.Volume_Descriptor_Type: db 2
.Standard_Identifier: db "CD001"
.Volume_Descriptor_Version: db 1
.Volume_Flags db 0
.System_Identifier:
times 32-($-.System_Identifier) db 0
.Volume_Identifier:
db 0,"B",0,"o",0,"o",0,"t",0,"a",0,"b",0,"l",0,"e",0," ",0,"C",0,"D"
times 32-($-.Volume_Identifier) db 0
times 8 db 0
.Volume_Space_Size: lb_dd ((Boot_Sector-Bootable_CD)/2048)
.Escape_Sequence: db 37, 47, 69
times 32-($-.Escape_Sequence) db 0
.Volume_Set_Size: lb_dw 1
.Volume_Sequence_Number: lb_dw 1
.Logical_Block_Size: lb_dw 2048
.Path_Table_Size: lb_dd 10
.Type_L_Path_Table: dd ((Supplementary_Type_L_Path_Table-Bootable_CD)/2048)
.Optional_Type_L_Path_Table: dd 0
.Type_M_Path_Table: msb_dd ((Supplementary_Type_M_Path_Table-Bootable_CD)/2048)
.Optional_Type_M_Path_Table: msb_dd 0
.Root_Directory_Record:
.size: db 34
.extended_attribute: db 0
.location: lb_dd ((Supplementary_Directory_Records-Bootable_CD)/2048)
.data_length: lb_dd 2048
binary_date 2005, 1, 1, 0, 0, 0, 0
.file_flags: db 2
.file_unit_size: db 0
.interleave_gap_size: db 0
.volume_sequence_number: lb_dw 0
.length_of_file_identifier: db 1
.file_identifier: db 0
.Volume_Set_Identifier:
times 128-($-.Volume_Set_Identifier) db 0
.Publisher_Identifier:
times 128-($-.Publisher_Identifier) db 0
.Data_Preparer_Identifier:
times 128-($-.Data_Preparer_Identifier) db 0
.Application_Identifier:
times 128-($-.Application_Identifier) db 0
.Copyright_File_Identifier:
times 37-($-.Copyright_File_Identifier) db 0
.Abstract_File_Identifier:
times 37-($-.Abstract_File_Identifier) db 0
.Bibliographic_File_Identifier:
times 37-($-.Bibliographic_File_Identifier) db 0
Supplementary_Volume_Creation_Date_and_Time:
text_date "2005", "01", "01", "00", "00", "00", "00", 0
Supplementary_Volume_Modification_Date_and_Time:
text_date "2005", "01", "01", "00", "00", "00", "00", 0
.Volume_Expiration_Date_and_Time:
times 17 db 0
.Volume_Effective_Date_and_Time:
times 17 db 0
.File_Structure_Version: db 1
times 2048-($-Supplementary_Volume_Descriptor) db 0
Terminator_Volume_Descriptor:
.Volume_Descriptor_Type: db 255
.Standard_Identifier: db "CD001"
.Volume_Descriptor_Version: db 1
times 2048-($-Terminator_Volume_Descriptor) db 0
Boot_Sector:
org 7C00h
|